package com.shuiyu.cloud.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author rjw
 * <p>Description:   </p>
 * @ClassName MySelfRule
 * @time 2021/7/16 13:31
 */

@Configuration
public class MySelfRule {

    @Bean
    public IRule myRule(){
        return new RandomRule();    //定义为随机,默认轮训，ribbon
    }


}
